namespace Digitalmes.Application.Providers;

/// <summary>
/// 数据同步提供者接口。
/// </summary>
public interface IRemoteSynchronousProvider : IApplicationService
{
    /// <summary>
    /// 数据同步方式，如 MQ、HTTP、Table、RPC 等
    /// </summary>
    string? SyncMethod { get; }

    /// <summary>
    /// 推送数据。
    /// </summary>
    /// <param name="executionId">工艺步骤执行记录 Id</param>
    /// <param name="syncMode">同步模式</param>
    /// <param name="cancellationToken"></param>
    /// <returns></returns>
    Task<(bool ok, string? error)> PushAsync(long executionId, RemoteSyncModeEnum syncMode, CancellationToken cancellationToken = default);
}
